﻿@{
    Layout = null;
}
@model System.Data.DataTable
<!DOCTYPE html>
<html>
 @Html.Partial("LoadPanelPartial")
<head>
    <title>重点税源分月缴纳财政收入情况表</title>
    @if (false)
    {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/json2.js", true)" type="text/javascript"></script>
    @Html.DevExpress().GetStyleSheets(
                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme },
                        new StyleSheet { ExtensionType = ExtensionType.TextBox, Theme = DevExpressHelper.Theme }
                                 
              
)

 @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/checkinput.js")" type="text/javascript"></script>
    <style type="text/css">
        #form_query
        {
        }
        .hide
        {
            display: none;
        }
        input, select
        {
            border: 1px solid #aecaf0;
        }
        input.txt, select.txt
        {
            width: 99%;
        }
     @*   input.btn
        {
            padding: 3px 10px 2px;
            border: #a3c0e8 1px solid;
            background: #e2f0ff url(/EnterpriseFund/DXR.axd?r=0_54) repeat-x 50% top;
            color: #2c4d79;
            cursor: pointer;
        }*@
        input.btn:hover
        {
            background-image: url(/EnterpriseFund/DXR.axd?r=0_57);
        }
        th
        {
            text-align: right;
        }
    </style>
    <script type="text/javascript">
     

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;


            var nsrsbh1 = $("#hFyear").val();
            var nsrbm1 = $("#hFmon").val();



            e.customArgs["Fyear"] = nsrsbh1;
            e.customArgs["Fmon"] = nsrbm1;


        }

        //查询
        function search() {
            //              var fspecialAdjustName = FSpecialAdjustName.GetText();
            //               var rKRQBeginDate = RKRQBeginDate.GetText();
            //                var rKRQEndDate = RKRQEndDate.GetText();
            if (CheckValues()) {
                $("#hFyear").val(Fyear.GetText());
                $("#hFmon").val(Fmon.GetText());
                $("#hsearched").val("T");
                gvEditing.Refresh();
            }
        }
        function CheckValues() {
            if (Fyear.GetText() == null | Fyear.GetText() == "") {
                alert('请选择正确的年度');
                return false;
            }

            if (isNaN(Fyear.GetText())) {
                alert('请选择正确的年度');
                return false;
            }
            if (Fmon.GetText() == null | Fmon.GetText() == "") {
                alert('请选择正确的月份');
                return false;
            }
            return true;
        }

        //重置
        function undo() {

           

            Fyear.SetText("");
            Fmon.SetText("");
           
        }
        function Editqy() {
            $("#popContent1").attr("src", rootPath + "/Key_NSRXX/Index?report=2");
            codeModalMode1.Show();
        }
        function MenuTop_emClick(source, e) {
            switch (e.item.name) {
                case "btnExcel":
                    {
                        if ($("#hFyear").val() == "" | $("#hFyear").val() == null | $("#hFmon").val() == "" | $("#hFmon").val() == null) {
                            alert('请选择正确的年度或月份');
                        } else {
                            if ($("#hsearched").val() == "T") {
                                //if (CheckValues())
                                form_query.target = '_self';
                                form_query.action = rootPath + "/QueryZD/ExportToXls";
                                form_query.submit();
                            }
                        }
                        break;


                    }
                case "btnReport":
                    {
                        if ($("#hFyear").val() == "" | $("#hFyear").val() == null | $("#hFmon").val() == "" | $("#hFmon").val() == null) {
                            alert('请选择正确的年度或月份');
                        } else {
                            if ($("#hsearched").val() == "T") {
                                window.showModalDialog(rootPath + "/QueryZD/Print", window, "dialogWidth=800px;dialogHeight=500px");
                            } 
                        }
                        break;


                    }
                case "btnGridShow":
                    {
                        gvEditing.ShowCustomizationWindow();
                        break;
                    }

            }
        }
        function keyPress() {
            if (event.keyCode && event.keyCode == 13) {
                search();

            }

        }
        function codeCancel1() {
            codeModalMode1.Hide();
        }
    </script>
</head>
<body onkeypress="keyPress()">
    
    @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnExcel";
        item.Text = "导出Excel";
        item.Image.Url = Url.Content("~/Content/ControlImages/excel.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnReport";
        item.Text = "打印";
        item.Image.Url = Url.Content("~/Content/icons/print.png");
    });

    settings.Items.Add(item =>
    {
        item.Name = "btnGridShow";
        item.Text = "选择列";
        item.Image.Url = Url.Content("~/Content/FunctionImages/AllowanceFileAudit.png");
    });
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    @using (Html.BeginForm("ExportToXls", "QueryFIssueNo", FormMethod.Post, new { id = "form_query" }))
    {
      <table width="100%">
            <tr>
                <td align="center">
                    <table>
                        <tr>
                            <td align="right" style="text-align: right">
                                年度：
                            </td>
                            <td align="right" style="text-align: right">
                                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Fyear";
               
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
               
               }).GetHtml()
                            </td>
                            <td align="right" style="text-align: right">
                                月份：
                            </td>
                            <td align="right" style="text-align: right">
                                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "Fmon";
                  
                   settings.Width = System.Web.UI.WebControls.Unit.Pixel(120);
                  
               }).GetHtml()
                            </td>
                            <td>
                                @Html.DevExpress().Button(settings =>
{
    settings.Name = "btnrpt";
    settings.Text = "编辑企业";
    settings.ControlStyle.CssClass = "button";
    settings.Images.Image.Url = Url.Content("~/Content/FunctionImages/SpecificAdjustManage.png");
    settings.ClientSideEvents.Click = "Editqy";
}).GetHtml()
                            </td>
                            <td>
                                @Html.DevExpress().Button(settings =>
{
    settings.Name = "btnSearch";
    settings.Text = "查询";
    settings.ControlStyle.CssClass = "button";
    settings.Images.Image.Url = Url.Content("~/Content/ControlImages/search.png");
    settings.ClientSideEvents.Click = "search";
}).GetHtml()
                            </td>
                            <td>
                    @Html.DevExpress().Button(settings =>
               {
                   settings.Name = "btnUndo";
                   settings.Text = "重置";
                   settings.ControlStyle.CssClass = "button";
                   settings.Images.Image.Url = Url.Content("~/Content/ControlImages/undo_blue.png");
                   settings.ClientSideEvents.Click = "undo";
               }).GetHtml()
                </td>
                   <td colspan="1"> <p style="color: #FF0000; white-space: nowrap; line-height: normal; " > 注:税款数据单位为万元</p></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
            
         
        @Html.DevExpress().PopupControl(
    settings =>
    {
        settings.Name = "codeModalMode1";
        settings.Width = 750;
        settings.Height = 500;
        settings.AllowDragging = true;
        settings.CloseAction = CloseAction.CloseButton;
        settings.EnableAnimation = false;
        settings.HeaderText = "编辑纳税人";
        settings.Modal = true;
        settings.PopupHorizontalAlign = PopupHorizontalAlign.WindowCenter;
        settings.PopupVerticalAlign = PopupVerticalAlign.WindowCenter;
        settings.ShowFooter = true;
        settings.SetFooterTemplateContent(s =>
        {
            ViewContext.Writer.Write("<table align='center'><tr><td>");

            @Html.DevExpress().Button(footBtnSettings =>
            {
                footBtnSettings.Name = "btnCancel1";
                footBtnSettings.Text = "关闭";
                footBtnSettings.ClientSideEvents.Click = "codeCancel1";
                footBtnSettings.Images.Image.Url = Url.Content("~/Content/ControlImages/no.png");
                footBtnSettings.CausesValidation = false;
            }).GetHtml();
            ViewContext.Writer.Write("</td></tr></table>");

        });
        settings.SetContent(() =>
        {
            ViewContext.Writer.Write("<iframe  id='popContent1' name='popContent1' style='width:100%;height:500px' frameborder='0' ></iframe>");
        });
    }).GetHtml()      
        @Html.Partial("QueryZDListPartial", Model);
        @Html.Hidden("hFyear", "");
        @Html.Hidden("hFmon", "");
        @Html.Hidden("hsearched", "F")

    }
</body>
</html>
<script>
    lp.Hide();
</script>
